using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SEA.Asignaturas_Alumno
{
    public partial class DetallesSolicitud : Form
    {
        public DetallesSolicitud(List<MateriaFecha> materias)
        {
            InitializeComponent();

            int height = 0;

            foreach (MateriaFecha m in materias)
            {
                height = m.Size.Height; // lolz

                m.Location = new Point(0, height * materiasPanel.Controls.Count);

                materiasPanel.Controls.Add(m);
            }

            Size = new Size(533, (height * materiasPanel.Controls.Count) + 80);
            materiasPanel.Size = new Size(494, height * materiasPanel.Controls.Count);

            int okX = okButton.Location.X;
            okButton.Location = new Point(okX, Size.Height - 65);
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}